
@if(count($datas))
    @foreach($datas as $data)
<div class="am-panel-bd">
    <div class="am-g">
        <div class="am-u-md-12">
            <div class="am-panel am-panel-default"
                 style="height:{{ceil(count($data['subs'])/3)*80+40}}px;"
                >
                <div class="am-panel-hd">
                    <a href="javascript:;">
                        {{$data['name']}}
                    </a>
                    <div class="am-btn-group am-btn-group-xs am-fr">
                        <div class="am-btn-group am-btn-group-xs am-fr">
                            <a href="{{$prefix_url}}/{{$data['id']}}/edit"
                               class="am-btn am-btn-default
                               am-btn-xs am-text-secondary">
                                <span class="am-icon-edit"></span>
                                编辑
                            </a>
                        </div>
                    </div>
                </div>
                <br>
                @if($subs=$data['subs'])
                    @foreach($subs as $sub)
                <div class="am-u-md-4 am-u-end">
                    <div class="am-panel am-panel-default">
                        <div class="am-panel-hd">
                            <a href="{{$prefix_url}}/{{$sub['id']}}">
                                @if(mb_strlen($sub['name'])>4)
                                    {{mb_substr($sub['name'],0,4).'...'}}
                                @else {{$sub['name']}}
                                @endif
                            </a>
                            <div class="am-btn-group am-btn-group-xs am-fr">
                                <a href="{{$prefix_url}}/{{$sub['id']}}/edit"
                                   class="am-btn am-btn-default am-btn-xs
                                   am-text-secondary">
                                    <span class="am-icon-edit"></span>
                                    编辑
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
                    @endforeach
                @endif
            </div>
        </div>
    </div>
</div>
    @endforeach
@endif